1. Field of the Invention
The present invention relates to an image processing apparatus configured to process a pixel output of an image sensor utilizing part of pixels as phase difference detecting elements to thereby detect a focus state, image processing method, and recording medium on which an image processing program is recorded.
2. Description of the Related Art
A proposal concerning an imaging apparatus configured to detect a focus state by utilizing part of pixels of an image sensor as phase difference detecting elements has been made by, for example, Japanese Patent No. 3592147. The imaging apparatus disclosed in Japanese Patent No. 3592147 sets part of pixels of an image sensor to phase difference detecting pixels, focuses subject light flux components passing through different pupil regions symmetrical with respect to an optical axis center of a photographing lens into images on the plurality of phase difference detecting pixels, and detects a phase difference between the subject light flux components to thereby detect a focus state of the photographing lens.
Part of the area of the phase difference detecting pixels is, for example, shaded from light so that the part of the area can receive one of subject light flux components passing through different pupil regions of the photographing lens. As a result, the pixel output of the phase difference detecting pixel cannot be used as an image as it is. Therefore, an imaging apparatus disclosed in Jpn. Pat. Appln. KOKAI Publication No. 2010-062640 makes a pixel output of a phase difference detecting pixel utilizable for recording or display by gain-adjusting the pixel output of the phase difference detecting pixel or interpolating the pixel output by using peripheral pixels.